package westeel.dataserver;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import westeel.dataserver.utils.DataSourceFactoryOnStart;

@EnableAspectJAutoProxy(exposeProxy = true)
//因为是多数据源的方式,所以要禁止德鲁伊和springboot自动创建数据源
@SpringBootApplication(exclude = {
        DataSourceAutoConfiguration.class
        //, DruidDataSourceAutoConfigure.class
})
public class DynamicDataSourceApplication {
    public static void main(String[] args) {
        DataSourceFactoryOnStart.InitFromProperties();
        SpringApplication.run(DynamicDataSourceApplication.class, args);
    }

}
